<?php $request = sfContext::getInstance()->getRequest(); ?>
<?php foreach($headers as $key => $result) if($result['allow_header'] == true): ?>
<th>  
  <?php if($result['col']): ?>
  <a href="<?php echo url_for(array('table'=>$request->getParameter('table'),'action'=> 'order', 'orderBy'=>$result['col']), true)?>"><?php echo $result['Translation'][$request->getParameter('sf_culture')]['name']; ?></a>
  <?php else: ?>
    <?php echo $result['Translation'][$request->getParameter('sf_culture')]['name']; ?>
  <?php endif; ?>
  <?php if($result['allow_search'] == true) include_component('field', 'table_search', array('type' => $result['cmsFieldType']['name'], 'subtype'=>$result['subtype'],'column' => $result['col'], 'table' => $request->getParameter('table'))); ?>
</th>
<?php endif; ?>